package de.jkoslows.decisions.entity;

import static de.jkoslows.util.control.Util.*;
import de.jkoslows.decisions.control.Types;

public class Parameter {

	public Type type;
	public double value;
	public Unit unit;

	public Parameter(Type type, double value, Unit unit) {
		this.type = assertNotNull(type, Type.class);
		this.value = assertNotNull(value, Double.class);
		this.unit = assertNotNull(unit, Unit.class);
	}

	public static Type emptyType() {
		return Types.getType(Types.empty.toString());

	}

	public static Unit emptyUnit() {
		return new Unit("unit");
	}

	public Parameter() {
		this(emptyType(), 0.0d, emptyUnit());
	}
	
	public boolean sameType(Parameter other){
		return this.type.equals(other.type);
	}

}
